// app.js
App({
  onLaunch() {
    // 检查是否已设置末次月经时间和预产期
    const taskList = wx.getStorageSync('taskList') || [];
    const hasPregnancyTasks = taskList.some(task => task.type === 'pregnancy');
    
    if (!hasPregnancyTasks) {
      wx.redirectTo({
        url: '/pages/setting/setting'
      });
    }
  }
})
